/**
 * @description  流动性风险
 * @author shenhong
 */
import React, { PureComponent } from 'react';
import { connect } from 'dva';
import { Row, Col } from 'antd';
import _ from 'lodash';
import colorArr from '../../../css/colors.js';
import style from './index.less';

class ShowArea extends PureComponent {
  constructor() {
    super();
    this.state = {};
  }

  showArea = () => {
    const { args } = this.props;
    const colors = colorArr.debtAndProfit.text;

    return (
      <div className={style.list_Text}>
        <p className='jiaCu2'>日无冲击变现金额计算规则</p>
        <Row>
          <Col span={11}>
            <ul>
              <li>
                <span style={{ color: `${colors[3]}` }}>
                  股票：<span>最近{`${args.stockDays}`}个交易日</span>市场成交金额均值的<span>{`${args.stockRate * 100}%`}</span>
                </span>
              </li>
              <li>
                <span style={{ color: `${colors[3]}` }}>
                  债券：<span>最近{`${args.bondDays}`}个交易日</span>市场成交金额均值的<span>{`${args.bondRate * 100}%`}</span>
                </span>
              </li>
              {/* <li><span style={{ color: `${colors[3]}` }}>ETF基金：<span>最近{`${args.FundDays}`}个交易日</span>市场成交金额均值的<span>{`${args.FundRate * 100}%`}</span></span></li>
              <li><span style={{ color: `${colors[3]}` }}>场外基金：上一公告日基金总份额的10%*当日的单位净值</span></li> */}
              <li>
                <span style={{ color: `${colors[3]}` }}>
                  基金：若为场内（ETF）基金，采用<span>最近{`${args.FundDays}`}个交易日</span>市场成交金额均值的<span>{`${args.FundRate * 100}%`}</span>
                  ，若为场外基金，采用上一公告日基金总份额的10%*当日的单位净值
                </span>
              </li>
            </ul>
          </Col>
          <Col span={13}>
            <ul>
              <li>
                {' '}
                <span style={{ color: `${colors[3]}` }}>现金：当天全部变现</span>
              </li>
              <li>
                <span style={{ color: `${colors[3]}` }}>回购：买入返售证券市值/逆回购天数(持仓市值/天数)为变现金额，仅考虑逆回购，不考虑正回购</span>
              </li>
              <li>
                <span style={{ color: `${colors[3]}` }}>其他资产：到期变现。能取到到期日期的，按到期变现(持仓市值/天数)处理，否则按现金处理，当日变现</span>
              </li>
              <li>
                <span className='jiaCu'>单个标的T+N日变现金额=min(日无冲击变现额*N，该日持仓市值)</span>
              </li>
            </ul>
          </Col>
        </Row>
      </div>
    );
  };
  render() {
    return <div style={{ marginTop: '10px' }}>{this.showArea()}</div>;
  }
}
export default connect(({ liquidityRiskM, loading }) => ({
  liquidityRiskM,
  loading: loading.effects['liquidityRiskM/getTableDataTwo'],
}))(ShowArea);
